 package patrol.mobile.com.mobilepatrol.adapter;

 import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import java.util.List;

import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.activity.BaseActivity;
import patrol.mobile.com.mobilepatrol.bean.Hddqjcb;

 /**
 * Created by long on 2016/8/24.
 * 桥梁巡查列表
 */
public class CulvertRegularListAdapter extends BaseQuickAdapter<Hddqjcb> {
    private BaseActivity context;
    public CulvertRegularListAdapter(Context context, List<Hddqjcb> data) {
        super(context, data);
        this.context = (BaseActivity) context;
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item8_index;
    }

    @Override
    protected void convert(final BaseViewHolder holder, final Hddqjcb item) {
        holder.setText(R.id.index, item.index+"");
        holder.setText(R.id.tv1, item.roadname+" "+ item.jcsj);
        holder.setText(R.id.tv2, "检查人 ： "+item.jcr);
        if (item.isUp){
            holder.setVisible(R.id.iv_up,true);
        }else{
            holder.setVisible(R.id.iv_up,false);
        }
    }

}
